home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 12 / BBS in a box XII-1.iso / Files / System7 tools / A / Apollo 1.0.sit / Apollo 1.0 / About Apollo 1.0.rsrc / TEXT_141.txt < prev    next >
Encoding:
Text File  |  1992-11-26  |  1.2 KB  |  19 lines

  1. Programmers‚Äô information
  2.  
  3. The information in this chapter applies only if your system supports the _Gestalt trap: that is, if it is system 6.0.4 or later.
  4.  
  5. Apollo registers a new Gestalt selector of value 'ApoL'. The information returned from this selector is a handle to an instance of the following structure (described in C):
  6.  
  7. struct
  8.  {  long version;          // same as first 4 bytes of 'vers' resource
  9.     short attr;            // attribute bits: see below
  10.     Boolean (*Control)(Boolean)   // control function
  11.  };
  12.  
  13. Only the bottom bit of attr is defined: it is set to 1 if Apollo is enabled and 0 if it is disabled (obviously, if Apollo is not loaded, Gestalt will return gestaltUndefSelectorErr). Other bits are set to zero.
  14.  
  15. Control takes a single Boolean argument: if it is false, Apollo is disabled (but only until next restart) and if true, Apollo is re-enabled. When disabled, Apollo will still draw its menu bar icons (if any), but it will not respond to mouse clicks or key commands.
  16.  
  17. If you disable Apollo using the Control function, the only way to re-enable it is to restart or to use the Control function again.
  18.  
  19. The handle is created in the current heap and it is the caller‚Äôs responsibility to dispose of it.